package cn.edu.gzist.kafka.service;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Service;

@Service
public class KafkaReceiver {

    @KafkaListener(topics = {"test_topic"},groupId = "groud_124")
    public void consume(String message) {
        System.out.println("groud_124 接收的信息 = "+message);
    }

    @KafkaListener(topics = {"test_topic"},groupId = "groud_123")
    public void consume3(String message) {
        System.out.println("groud_123 接收的信息 = "+message);
    }
}
